home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / BenchMarks / ByteBenchmark / Makefile next >
Makefile  |  1995-03-21  |  8KB  |  221 lines

  1. ##############################################################################
  2. #  The BYTE UNIX Benchmarks - Release 3
  3. #          Module: Makefile   SID: 3.9 5/15/91 19:30:15
  4. #          
  5. ##############################################################################
  6. # Bug reports, patches, comments, suggestions should be sent to:
  7. #
  8. #    Ben Smith or Tom Yager at BYTE Magazine
  9. #    bensmith@bytepb.byte.com    tyager@bytepb.byte.com
  10. #
  11. ##############################################################################
  12. #  Modification Log: 7/28/89 cleaned out workload files
  13. #                    4/17/90 added routines for installing from shar mess
  14. #                    7/23/90 added compile for dhrystone version 2.1
  15. #                          (this is not part of Run file. still use old)
  16. #                          removed HZ from everything but dhry.
  17. #                          HZ is read from the environment, if not
  18. #                          there, you must define it in this file
  19. #                    10/30/90 moved new dhrystone into standard set
  20. #                          new pgms (dhry included) run for a specified
  21. #                          time rather than specified number of loops
  22. #                    4/5/91 cleaned out files not needed for
  23. #                          release 3 -- added release 3 files -ben
  24. ##############################################################################
  25. ID="@(#)Makefile:3.9 -- 5/15/91 19:30:15";
  26. SHELL = /bin/sh
  27. #HZ = ????         #(read from environment)
  28. CFLAGS = -arch m68k -arch i386 -arch hppa -arch sparc -DTIME
  29. OPTON = -O        #optimization on (give it your best shot) 
  30.                   #            -- check your compiler man
  31. OPTOFF = -Od      #optimization off -- check your compiler man
  32. # local directories
  33. PROGDIR = ./pgms
  34. SRCDIR = ./src
  35. DOCDIR = ./doc
  36. TESTDIR = ./testdir
  37. RESULTDIR = ./results
  38. TMPDIR = ./tmp
  39. # other directories
  40. INCLDIR = /usr/include
  41. LIBDIR = /lib
  42. SCRIPTS = byte.logo cleanup.sh \
  43.     fs.awk multi.sh tst.sh index.sh index.base \
  44.     index.awk loops.awk loopm.awk\
  45.     report.sh report.awk
  46. SOURCES = arith.c big.c context1.c \
  47.     dummy.c execl.c \
  48.     fstime.c getopt.c hanoi.c \
  49.     pipe.c spawn.c limit.c \
  50.     syscall.c looper.c timeit.c \
  51.     dhry_1.c dhry_2.c dhry.h 
  52. DOCS = bench.doc bench3.doc
  53. TESTS = sort.src cctest.c dc.dat
  54. RESULTS = reports.shar
  55. BINS = $(PROGDIR)/arithoh $(PROGDIR)/register $(PROGDIR)/short \
  56.     $(PROGDIR)/int $(PROGDIR)/long $(PROGDIR)/float $(PROGDIR)/double \
  57.     $(PROGDIR)/hanoi \
  58.     $(PROGDIR)/fstime $(PROGDIR)/syscall $(PROGDIR)/context1 \
  59.     $(PROGDIR)/pipe $(PROGDIR)/spawn $(PROGDIR)/execl \
  60.     $(PROGDIR)/dhry2 $(PROGDIR)/dhry2reg  $(PROGDIR)/looper
  61. REQD = $(BINS) $(PROGDIR)/byte.logo $(PROGDIR)/cleanup.sh  \
  62.     $(PROGDIR)/fs.awk $(PROGDIR)/multi.sh \
  63.     $(PROGDIR)/tst.sh $(PROGDIR)/index.sh $(PROGDIR)/index.base \
  64.     $(PROGDIR)/index.awk $(PROGDIR)/loops.awk $(PROGDIR)/loopm.awk \
  65.     $(PROGDIR)/report.sh $(PROGDIR)/report.awk \
  66.     $(TESTDIR)/sort.src $(TESTDIR)/cctest.c $(TESTDIR)/dc.dat
  67.  
  68. # ######################### the big ALL ############################
  69. all: distr programs
  70.     @chmod 744 * $(SRCDIR)/* $(PROGDIR)/* $(TESTDIR)/* $(DOCDIR)/*
  71.  
  72. # ####################### a check for Run ######################
  73. check: $(REQD)
  74.     make all
  75. # ##############################################################
  76. # distribute the files out to subdirectories if they are in this one
  77. distr: 
  78.     @echo "Checking distribution of files"
  79. # scripts
  80.     @if  test ! -d  $(PROGDIR) \
  81.         ; then  \
  82.            mkdir $(PROGDIR) \
  83.            ; mv $(SCRIPTS) $(PROGDIR) \
  84.         ; else \
  85.            echo "$(PROGDIR)  exists" \
  86.         ; fi
  87. # C sources
  88.     @if  test ! -d  $(SRCDIR) \
  89.         ; then  \
  90.            mkdir $(SRCDIR) \
  91.            ; mv $(SOURCES) $(SRCDIR) \
  92.         ; else \
  93.            echo "$(SRCDIR)  exists" \
  94.         ; fi
  95. # test data
  96.     @if  test ! -d  $(TESTDIR) \
  97.         ; then  \
  98.            mkdir $(TESTDIR) \
  99.            ; mv $(TESTS) $(TESTDIR) \
  100.         ; else \
  101.            echo "$(TESTDIR)  exists" \
  102.         ; fi
  103. # documents directory
  104.     @if  test ! -d  $(DOCDIR) \
  105.         ; then  \
  106.            mkdir $(DOCDIR) \
  107.        ; mv $(DOCS) $(DOCDIR) \
  108.         ; else \
  109.            echo "$(DOCDIR)  exists" \
  110.         ; fi
  111. # temporary work directory
  112.     @if  test ! -d  $(TMPDIR) \
  113.         ; then  \
  114.            mkdir $(TMPDIR) \
  115.         ; else \
  116.            echo "$(TMPDIR)  exists" \
  117.         ; fi
  118. # directory for results
  119.     @if  test ! -d  $(RESULTDIR) \
  120.         ; then  \
  121.            mkdir $(RESULTDIR) \
  122.        ;  mv $(RESULTS) $(RESULTDIR) \
  123.         ; else \
  124.            echo "$(RESULTDIR)  exists" \
  125.         ; fi
  126.  
  127. programs: $(BINS)
  128.  
  129. # Individual programs
  130. $(PROGDIR)/arithoh:    $(SRCDIR)/arith.c
  131.     cc -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
  132. $(PROGDIR)/register: $(SRCDIR)/arith.c
  133.     cc -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum=register $(SRCDIR)/arith.c
  134. $(PROGDIR)/short: $(SRCDIR)/arith.c
  135.     cc -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
  136. $(PROGDIR)/int: $(SRCDIR)/arith.c
  137.     cc -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
  138. $(PROGDIR)/long: $(SRCDIR)/arith.c
  139.     cc -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
  140. $(PROGDIR)/float: $(SRCDIR)/arith.c
  141.     cc -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
  142. $(PROGDIR)/double: $(SRCDIR)/arith.c
  143.     cc -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
  144. $(PROGDIR)/hanoi: $(SRCDIR)/hanoi.c
  145.     cc -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
  146. $(PROGDIR)/fstime: $(SRCDIR)/fstime.c
  147.     cc -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} -Dawk=1 $(SRCDIR)/fstime.c
  148. $(PROGDIR)/syscall: $(SRCDIR)/syscall.c
  149.     cc -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
  150. $(PROGDIR)/context1: $(SRCDIR)/context1.c
  151.     cc -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
  152. $(PROGDIR)/pipe: $(SRCDIR)/pipe.c
  153.     cc -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
  154. $(PROGDIR)/spawn: $(SRCDIR)/spawn.c
  155.     cc -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
  156. $(PROGDIR)/execl: $(SRCDIR)/execl.c $(SRCDIR)/big.c
  157.     cc -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
  158. $(PROGDIR)/dhry2: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
  159.     cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c  
  160.     cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c  
  161.     cc -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o 
  162.     cd $(SRCDIR); rm -f dhry_1.o dhry_2.o 
  163. $(PROGDIR)/dhry2reg: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h 
  164.     cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
  165.     cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
  166.     cc -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
  167.     cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
  168. $(PROGDIR)/looper: $(SRCDIR)/looper.c
  169.     cc -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
  170.  
  171. # Run the benchmarks and create the reports
  172. run:
  173.     sh ./Run
  174.  
  175. report:
  176.     sh pgms/report.sh results/log > results/report
  177.     sh pgms/index.sh pgms/index.base results/log >> results/report
  178.     cat results/report
  179.  
  180. # SCCS stuff and disk reproduction
  181. clean:
  182.     rm -f $(BINS)
  183.  
  184. delta:
  185.     delta -y"development step" sccs/s.Run sccs/s.README
  186.     cd src; delta -y"development step" sccs
  187.     cd pgms; delta -y"development step" sccs
  188.     cd testdir; delta -y"development step" sccs
  189.     cd doc; delta -y"development step" sccs
  190. get:
  191.     get -e sccs/s.Run sccs/s.README
  192.     cd src; get -e sccs
  193.     cd pgms; get -e sccs
  194.     cd testdir; get -e sccs
  195.     cd doc; get -e sccs
  196.     chmod 744 $(SRCDIR)/* 
  197.     chmod 755 $(PROGDIR)/* *
  198. rel:
  199.     cd bench; rm -f Makefile Run README; get ../sccs
  200.     cd bench/src; rm -f *; get ../../src/sccs
  201.     cd bench/pgms; rm -f *; get ../../pgms/sccs
  202.     cd bench/testdir; rm -f *; get ../../testdir/sccs
  203.     cd bench/doc; rm -f *; get ../../doc/sccs
  204.     cd bench; chmod 744 src/* testdir/*
  205.     cd bench; chmod 755 * pgms/*
  206.  
  207. tar48:
  208.     format /dev/rdsk/f05d9t 
  209.     tar cfb /dev/rdsk/f05d9t 20 bench
  210.     tar tf /dev/rdsk/f05d9t 
  211.  
  212. tar96:
  213.     format /dev/rdsk/f05ht
  214.     tar cfb /dev/rdsk/f05ht 20 bench
  215.     tar tf /dev/rdsk/f05ht
  216.  
  217. tar135:
  218.     format /dev/rdsk/f13dt
  219.     tar cfb /dev/rdsk/f13dt 20 bench
  220.     tar tf /dev/rdsk/f13dt
  221.